package net.hn.hnms.sys.system.api;

import net.hn.hnms.sys.common.core.constant.ServiceNameConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 数据权限服务
 *
 * @author Lion Li
 */
@FeignClient(contextId = "RemoteDataScopeService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteDataScopeService {

    /**
     * 获取角色自定义权限语句
     *
     * @param roleId 角色Id
     * @return 角色权限
     */
    @GetMapping("remoteDataScope/getRoleCustom")
    String getRoleCustom(@RequestParam("roleId") Long roleId);

    /**
     * 获取部门和下级权限语句
     *
     * @param deptId 部门Id
     * @return 部门权限
     */
    @GetMapping("remoteDataScope/getDeptAndChild")
    String getDeptAndChild(@RequestParam("deptId") Long deptId);

}
